package cn.util;

public class ExceptionUtil {
	/**
	 * 输出异常栈信息
	 * 
	 * @param e
	 * @return
	 */
	public static String getExceptionStack(Exception e) {
		StringBuffer result = new StringBuffer("");
		StackTraceElement[] trace = e.getStackTrace();
		result.append("\n " + e.getClass() + ":" + e.getMessage());
		for (int i = 0; i < trace.length; i++)
			result.append("\n\tat " + trace[i]);
		return result.toString();
	}
}
